/*
 * $Id$
 */
package corejs.rt;

import corejs.stmt.StatementVisitor;

/**
 * Created by pengyu on 2014-09-06.
 */
public interface ExecutionContext {
   Value get();
   
   <T> T get(Class<T> clz);

   Value get(String name);

   <T> T get(String name, Class<T> clz);

   Number getNumber(String name);
 
   Number getNumber(String name, int defaultInt);

   Str getStr(String name);
  
   ExecutionContext put(String name, Value val);
   
   Str toStr(Value src);

   StatementVisitor getStatementVisitor();

   Value invoke(Value obj, String methodName, Value... args);
   
   Value invoke(Value obj, Invocable fn, Value... args);
   
   ActivationRecord currentScope();
}
